package ar.edu.frba.utn.dds.Aterrizar;

import java.util.ArrayList;
import java.util.List;

import ar.edu.frba.utn.dds.Aerolinea.AeroLinea;
import ar.edu.frba.utn.dds.Conversor.ConversorAeroLanchita;
import ar.edu.frba.utn.dds.Conversor.ConversorAeroOceanic;

import com.lanchita.AerolineaLanchita;
import com.oceanic.AerolineaOceanic;

public class Aterrizar {
	List<AeroLinea> aerolineas = new ArrayList<AeroLinea>();
	
	public Aterrizar(){
	}

	public List<AeroLinea> getAerolineas() {
		return aerolineas;
	}

	public void setAerolineas(List<AeroLinea> aerolineas) {
		this.aerolineas = aerolineas;
	}
	
	/**
	 * Metodo que se encarga de agregar una compania
	 * @param companiaAerea
	 */
	public void agregarCompania(AeroLinea companiaAerea){
		this.aerolineas.add(companiaAerea);
	}
	
	public void agregarCompania(AerolineaOceanic aero){
		ConversorAeroOceanic conversor = new ConversorAeroOceanic();
		this.aerolineas.add(conversor.convertirAerolinea());
	}
	
	public void agregarCompania(AerolineaLanchita aero){
		ConversorAeroLanchita conversor = new ConversorAeroLanchita();
		this.aerolineas.add(conversor.convertirAerolinea());
	}
}
